<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#a{
				height: 30px;
			}
		</style>
		<script type="text/javascript">
			window.onload=function(){
				var btn01=document.getElementById('btn01');
				var time;
				var count=0;
				btn01.onclick=function(){
					clearInterval(time);
					time = setInterval(function(){
						var a=document.getElementById('a');
						var p=document.getElementById('p');
						a.innerHTML += '>';
						p.innerHTML =count;
						count++;
						if(count==101){
							var sp1=document.getElementById('sp1');
							sp1.innerHTML='加载完成';
							clearInterval(time);
						}
					},30);
				}
			}
		</script>
	</head>
	<body>
		<div id="a">	
		</div>
		<p id='p'>0</p>
		<span id="sp1">	
		</span>
		<button id="btn01">开始</button>
	</body>
</html>
